package com.bankfourfactor.nanyun;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
import java.util.UUID;

import com.ny.lib.NyGenerateKeyPair;

public class NyGenMerKeyPair {
	/**
	 * 名称： 商户公钥私钥生成<br>
	 */
	public static void main(String[] args) {
		NyGenerateKeyPair pair = new NyGenerateKeyPair();
		String key=new SimpleDateFormat("yyyyMMdd").format(new Date())+new SimpleDateFormat("HHmmss").format(new Date())+UUID.randomUUID().toString();//key可以自定义
		Map<String, String> result = pair.generateKeyPair(key);
		String priKey = result.get("priKey");//获取私钥
		String pubKey = result.get("pubKey");//获取公钥
		System.out.println("priKey================="+priKey);
		System.out.println("pubKey================="+pubKey);
	}
	
}
